package com.atguigu.gulimall.product.bn.controller;

import com.atguigu.gulimall.product.bn.bean.Car;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wjj
 * @create 2023-05-13 17:56
 */

// JRebel付费的热更新
//@ResponseBody
//@Controller  整合如下

@RestController
@Slf4j
public class HelloController {

    @RequestMapping("/hello")
    public String handle01(@RequestParam("name") String name) {


        log.info("请求进来了....");
        return "Hello, Spring Boot 2!" + "你好：" + name;
    }

    @Autowired
    Car car;


    @RequestMapping("/car")
    public Car car() {
        return car;
    }
}
